﻿Module m_main
    Public general_Ubound As Integer = 0 '号码数据数组上限
    Public dataCount As Integer = 0 '总的号码数据量
    Public arrQH() As String
    Public arrJH_S() As String
    Public arrJH_sep_I(,) As Integer

    Public arrJH_sep_zu_I(,) As Integer







    Sub init_Data()
        Dim tmpS As String = My.Resources.cqssc_data_分号格式
        tmpS = Del_lastString(tmpS, ";")
        Dim arr() As String = tmpS.Split(";")
        Dim arrX() As String
        Dim arrHaoMa(0 To 4) As Integer
        general_Ubound = UBound(arr)
        ReDim arrJH_S(0 To general_Ubound)
        ReDim arrQH(0 To general_Ubound)
        ReDim arrJH_sep_I(0 To general_Ubound, 0 To 4)
        ReDim arrJH_sep_zu_I(0 To general_Ubound, 0 To 4)
        For i = 0 To general_Ubound
            arrX = arr(i).Split(" ")
            arrJH_S(i) = arrX(1)
            arrQH(i) = arrX(0)
            For j = 0 To 4
                arrJH_sep_I(i, j) = Val(arrJH_S(i).Substring(j, 1))
                arrHaoMa(j) = arrJH_sep_I(i, j)
            Next
            Array.Sort(arrHaoMa)
            For j = 0 To 4
                arrJH_sep_zu_I(i, j) = arrHaoMa(j)
            Next
        Next
        DataCount = general_Ubound + 1
    End Sub
    Function Del_lastString(in_str As String, in_findString As String) As String
        Dim L As Integer = in_findString.Length
        If in_str = "" Then
            Return in_str
        End If
        Dim tmpST As String = in_str
        Dim tmpS As String = in_str.Substring(in_str.Length - L, L)
        Dim t As Integer = L
        Do While (tmpS = in_findString)
            tmpST = tmpST.Substring(0, tmpST.Length - t)
            tmpS = tmpST.Substring(tmpST.Length - L, L)
            t = t + L
        Loop
        Return tmpST
    End Function

End Module
